<template>
	<view>
		<view v-for="(item, i) in permission_routes" :key="i">
			<view class="cu-bar bg-white solid-bottom margin-top">
				<view class="action">
					<uni-text class="cuIcon-titles text-blue"></uni-text>
					{{item.menuName}}
				</view>
			</view>
			<view class="cu-list grid col-4">
				<view class="cu-item" v-for="(child, index) in item.children" @click="navTo(child.component)" :key="index">
					<view style="margin: 0 auto;">
						<u-image :src="baseFileUrl + child.iconApp" width="60" height="60"></u-image>
					</view>
					<text>{{child.menuName}}</text>
				</view>
			</view>
		</view>
	</view>
</template>
<script>

export default {
	data() {
		return {

		};
	},
	onLoad() {
		if(!this.token){
			uni.redirectTo({
			    url: '/pages/system/login/index'
			});
		}
	},
	methods: {
		navTo(url) {
			uni.navigateTo({
				url: "/pages/" + url
			});
		}
	}
};
</script>
<style lang="scss">
	@import '@/static/scss/system/workbench/index.scss';
</style>
